<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
class Mentoring extends Member_Controller {
    function __construct()
    {
      parent::__construct();
      $this->load->model('mentoring_model');
    }
    function index()
    {
        $data['main_content']='mentoring/index';
        $data['title']='Mentoring';
        $this->load->view('layout/master', $data);   
    }
    function thesis()
    {
        $data['main_content']='mentoring/thesis';
        $data['title']='Graduate Student Thesis Project';
        $this->load->view('layout/master', $data);   
    }
    function graduate()
    {
        $data['main_content']='mentoring/graduate';
        $data['title']='Graduate Student Course Project';
        $this->load->view('layout/master', $data);   
    }
    function undergraduate()
    {
        $data['main_content']='mentoring/undergraduate';
        $data['title']='Undergraduate Student Course Project';
        $this->load->view('layout/master', $data);   
    }
    function submit()
    {

        if ($this->input->post('other_button'))
        {
            if ($this->input->post('type') === 'undergraduate')
                $data = array('is_project' => 1 );
            else
                $data = array('is_project' => 2);
            $this->db->where('course_no',$this->input->post('other_course'));
            $this->db->update('course',$data);
        }
       
        
        
        redirect('mentoring');
    }
    function submit2()
    {}
}